Light emitting diodes (LEDs) have been widely used in applications such as card reading, character recognition, proximity sensing, label printing, electro-optical switching, and so on. In particular, LEDs have been used in conjunction with photodiodes in optical sensing systems. For example, an optical sensing system may drive an LED to produce certain radiant energy. This radiant energy is received by a photodiode after going through a medium or being reflected by a surface. The photodiode converts the received radiant energy to electrical current which is further processed for detecting, for example, the existence of the medium or the surface.
In the above optical sensing system, a resolution of sensing (e.g., the ability to differentiate between one and two pieces of thin paper) depends on multiple factors. One of the factors is the ability of the LED to maintain its radiant energy output (or optical output power) generally constant across a range of ambient temperatures that the optical sensing system is operated at. Unfortunately, the radiant energy output of most LEDs changes considerably with ambient temperature. Particularly, the radiant energy output of most LEDs decreases considerably when temperature increases if the input current to the LEDs stays the same. Such variation generally cannot be tolerated in conventional high-resolution optical sensing systems. Accordingly, improvements in this area are desired.